Add some UNIX-y if usb do(nothing) stubs.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 31 Oct 2004 20:23:58 +0000 (20:23 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 31 Oct 2004 20:23:58 +0000 (20:23 +0000)
gpsbabel/jeeps/gpsserial.c

index 60b62545f53483a63df3782fcd34c1e2a4fc5775..1953500d2e6666905536aeaf9e8a38ecbe9f5aa7 100644 (file)
@@ -221,6 +221,8 @@ static struct termios gps_ttysave;
 int32 GPS_Serial_Savetty(const char *port)
 {
     int32 fd;
+
+    if (gps_is_usb) return 1;
     
     if((fd = open(port, O_RDWR|O_NDELAY))==-1)
     {
@@ -262,6 +264,8 @@ int32 GPS_Serial_Savetty(const char *port)
 int32 GPS_Serial_Restoretty(const char *port)
 {
     int32 fd;
+
+    if (gps_is_usb) return 1;
     
     if((fd = open(port, O_RDWR|O_NDELAY))==-1)
     {
@@ -385,6 +389,7 @@ int32 GPS_Serial_Write(int32 handle, const void *obuf, int size)
 ************************************************************************/
 int32 GPS_Serial_Flush(int32 fd)
 {
+    if (gps_is_usb) return 1;
     
     if(tcflush(fd,TCIOFLUSH))
     {
@@ -411,6 +416,8 @@ int32 GPS_Serial_Flush(int32 fd)
 
 int32 GPS_Serial_Close(int32 fd, const char *port)
 {
+    if (gps_is_usb)  return 1;
+
     if(close(fd)==-1)
     {
        perror("close");